<div class="cities view">
<h2><?php  __('Thông tin chi tiết Tỉnh/Thành');?></h2>
	<dl><?php $i = 0; $class = ' class="altrow"';?>
		<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Id'); ?></dt>
		<dd<?php if ($i++ % 2 == 0) echo $class;?>>
			<?php echo $city['City']['id']; ?>
			&nbsp;
		</dd>
		<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Tên'); ?></dt>
		<dd<?php if ($i++ % 2 == 0) echo $class;?>>
			<?php echo $city['City']['name']; ?>
			&nbsp;
		</dd>

		<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Vùng/Miền'); ?></dt>
		<dd<?php if ($i++ % 2 == 0) echo $class;?>>
			<?php echo $city['City']['area']; ?>
			&nbsp;
		</dd>
		<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Thứ tự'); ?></dt>
		<dd<?php if ($i++ % 2 == 0) echo $class;?>>
			<?php echo $city['City']['ordering']; ?>
			&nbsp;
		</dd>
	</dl>
	
	<div class="related" style="margin-top:20px">
		<h3><?php __('Báo cáo Tỉnh/Thành qua các năm');?></h3>
		<?php if (!empty($city['CityDetail'])):?>
		<table cellpadding = "0" cellspacing = "0">
		<tr>
			<th><?php __('Dân số'); ?></th>
			<th><?php __('Diện tích'); ?></th>
			<th><?php __('Số dân tộc'); ?></th>
			<th><?php __('Số TP, huyện, thị xã'); ?></th>
			<th><?php __('Số TP, huyện, thị xã (hải đảo, núi'); ?></th>
			<th><?php __('Số phường, xả, thị trấn'); ?></th>
			<th><?php __('Số phường, xả, thị trấn (hải đảo, núi)'); ?></th>
			<th><?php __('Kinh phí'); ?></th>
			<th><?php __('Năm'); ?></th>
			<th class="actions"><?php __('Chức năng');?></th>
		</tr>
		<?php
			$i = 0;
			foreach ($city['CityDetail'] as $cityDetail):
				$class = null;
				if ($i++ % 2 == 0) {
					$class = ' class="altrow"';
				}
			?>
			<tr<?php echo $class;?>>
				
				<td><?php echo $cityDetail['population'];?></td>
				<td><?php echo $cityDetail['area'];?></td>
				<td><?php echo $cityDetail['ethnics_num'];?></td>
				<td><?php echo $cityDetail['cities_num'];?></td>
				<td><?php echo $cityDetail['cities_minority_num'];?></td>
				<td><?php echo $cityDetail['states_num'];?></td>
				<td><?php echo $cityDetail['states_minority_num'];?></td>
				<td><?php echo $cityDetail['outlay'];?></td>
				<td><?php echo $cityDetail['year'];?></td>
				<td class="actions">					
					<?php echo $this->Html->link(__('Chỉnh sửa', true), array('controller' => 'city_details', 'action' => 'edit', $cityDetail['id'])); ?>
					<?php echo $this->Html->link(__('Xóa', true), array('controller' => 'city_details', 'action' => 'delete', $cityDetail['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $cityDetail['id'])); ?>
				</td>
			</tr>
		<?php endforeach; ?>
		</table>
	<?php endif; ?>
	
		<div class="actions">
			<ul>
				<li><?php echo $this->Html->link(__('Thêm báo cáo', true), array('controller' => 'city_details', 'action' => 'add'));?> </li>
			</ul>
		</div>
	</div>
	<div class="related">
		<h3><?php __('Đơn vị RHM');?></h3>
		<?php if (!empty($city['Branch'])):?>
		<table cellpadding = "0" cellspacing = "0">
		<tr>
			<th><?php __('Tên'); ?></th>
			<th class="actions"><?php __('Chức năng');?></th>
		</tr>
		<?php
			$i = 0;
			foreach ($city['Branch'] as $branch):
				$class = null;
				if ($i++ % 2 == 0) {
					$class = ' class="altrow"';
				}
			?>
			<tr<?php echo $class;?>>
				<td><?php echo $branch['name'];?></td>
				<td class="actions">
					<?php echo $this->Html->link(__('Xem', true), array('controller' => 'branches', 'action' => 'view', $branch['id'])); ?>
					<?php echo $this->Html->link(__('Sửa', true), array('controller' => 'branches', 'action' => 'edit', $branch['id'])); ?>
					<?php echo $this->Html->link(__('Xóa', true), array('controller' => 'branches', 'action' => 'delete', $branch['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $branch['id'])); ?>
				</td>
			</tr>
		<?php endforeach; ?>
		</table>
	<?php endif; ?>
	
		<div class="actions">
			<ul>
				<li><?php echo $this->Html->link(__('Thêm đơn vị RHM', true), array('controller' => 'branches', 'action' => 'add'));?> </li>
			</ul>
		</div>
	</div>
</div>
<div class="actions">
	<h3><?php __('Chức năng'); ?></h3>
	<ul>
		<li><?php echo $this->Html->link(__('Chỉnh sửa', true), array('action' => 'edit', $city['City']['id'])); ?> </li>
		<li><?php echo $this->Html->link(__('Xóa', true), array('action' => 'delete', $city['City']['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $city['City']['id'])); ?> </li>
		<li><?php echo $this->Html->link(__('Danh sách Tỉnh/Thành', true), array('action' => 'index')); ?> </li>
		
	</ul>
</div>

